import Mock from 'mockjs'

/*
    接口得效果：根据用户传入得参数值，动态生成对应行数得文字内容
*/ 
Mock.mock(/\/mock\/getText/, 'get', ({ url }) => {
    let pms = url.split('?')[1]
    let numObj = new URLSearchParams(pms)
    let numGb = Number(numObj.get('fontNumbs'))
    const { textCont } = Mock.mock({
        textCont: {cparagraph: '@cparagraph('+ numGb +')'}
    })
    return {
        code: 200,
        message: 'success',
        textCont
    }

})